# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=libgsasl
pkgver=2.2.0
pkgrel=1
pkgdesc="An implementation of the Simple Authentication and Security Layer framework"
url="https://josefsson.org/gsasl/"
arch="all"
license="LGPL-2.0-or-later"
depends_dev="$pkgname-tools=$pkgver-r$pkgrel"
makedepends="libidn-dev libgss-dev libgcrypt-dev krb5-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://ftp.gnu.org/gnu/gsasl/gsasl-$pkgver.tar.gz"
builddir="$srcdir/gsasl-$pkgver"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-libgcrypt \
		--with-gssapi-impl=mit \
		--disable-nls \
		--disable-static
	make
}

check() {
	make tests
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="$pkgdesc (tools)"

	amove usr/bin
}

sha512sums="
0ae318a8616fe675e9718a3f04f33731034f9a7ba03d83ccb1a72954ded54ced35dc7c7e173fdcb6fa0f0813f8891c6cbcedf8bf70b37d00b8ec512eb9f07f5f  gsasl-2.2.0.tar.gz
"
